import { createI18n } from 'vue-i18n'

import zh from './zh'
import en from './en'
import id from './id'
import jp from './jp'
import kr from './kr'
import my from './my'
import tc from './tc'
import th from './th'
import vn from './vn'

// 创建 i18n
const i18n = createI18n({
  locale: 'zh',
  legacy: false,
  globalInjection: true, // 全局模式，可以直接使用 $t
  messages: {
    zh,
    en,
    id,
    jp,
    kr,
    my,
    tc,
    th,
    vn,
  },
})

export default i18n
